package org.dxj.restaurantmanagementsystem.entity;

/**
 * @author Ding
 * @date 2019/11/23 17:51
 */
public class User {

    /**
     * id
     */
    private Integer id;

    /**
     * 用户名
     */
    private String userName;

    /**
     * 密码
     */
    private String password;

    /**
     * 密保问题
     */
    private String question;

    /**
     * 密保答案
     */
    private String answer;

    /**
     * 用户权限
     */
    private Integer level;

    /**
     * User空参构造器
     */
    public User() {
    }

    /**
     * User初始化除id外所有参数的构造器
     * @param userName
     * @param password
     * @param question
     * @param answer
     * @param level
     */
    public User(String userName, String password, String question, String answer, Integer level) {
        this.userName = userName;
        this.password = password;
        this.question = question;
        this.answer = answer;
        this.level = level;
    }

    /**
     * User初始化所有参数的构造器
     * @param id
     * @param userName
     * @param password
     * @param question
     * @param answer
     * @param level
     */
    public User(Integer id, String userName, String password, String question, String answer, Integer level) {
        this.id = id;
        this.userName = userName;
        this.password = password;
        this.question = question;
        this.answer = answer;
        this.level = level;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getQuestion() {
        return question;
    }

    public void setQuestion(String question) {
        this.question = question;
    }

    public String getAnswer() {
        return answer;
    }

    public void setAnswer(String answer) {
        this.answer = answer;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", userName='" + userName + '\'' +
                ", password='" + password + '\'' +
                ", question='" + question + '\'' +
                ", answer='" + answer + '\'' +
                ", level=" + level +
                '}';
    }
}
